package com.qf.user.manager.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qf.common.bean.R;
import com.qf.common.dto.AreaDto;
import com.qf.common.model.QfArea;
import com.qf.user.manager.feign.AreaFeign;
import com.qf.user.manager.service.AreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 行政区管理
 * @author 千锋健哥
 */
@Service
public class AreaServiceImpl implements AreaService {

    @Autowired
    private AreaFeign areaFeign;


    @Override
    public R<QfArea> add(QfArea type) {
        R<QfArea> result = areaFeign.add(type);
        return result;
    }

    @Override
    public R<Boolean> delete(String id) {
        R<Boolean> result = areaFeign.delete(id);
        return result;
    }

    @Override
    public R<QfArea> update(QfArea type) {
        R<QfArea> result = areaFeign.update(type);
        return result;
    }

    @Override
    public R<QfArea> selectById(String id) {
        R<QfArea> result = areaFeign.selectById(id);
        return result;
    }

    @Override
    public R<Page<QfArea>> list(AreaDto dto) {
        R<Page<QfArea>> result = areaFeign.findByPage(dto);
        return result;
    }

    @Override
    public R<List> all(AreaDto dto) {
        R<List> result = areaFeign.findAll(dto);
        return result;
    }

}
